package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.zzw.TPeopleLinkEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPeopleLinkEventMapper;
import com.ruoyi.system.service.ITPeopleLinkEventService;

/**
 * 重点人和事件关联
 * Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-15
 */
@Service
public class TPeopleLinkEventServiceImpl extends ServiceImpl<TPeopleLinkEventMapper, TPeopleLinkEvent> implements ITPeopleLinkEventService {
    @Autowired
    private TPeopleLinkEventMapper tPeopleLinkEventMapper;

    /**
     * 查询重点人和事件关联
     *
     * @param cPeopleId 重点人和事件关联
     *                  主键
     * @return 重点人和事件关联
     */
    @Override
    public TPeopleLinkEvent selectTPeopleLinkEventByCPeopleId(Long cPeopleId) {
        return tPeopleLinkEventMapper.selectTPeopleLinkEventByCPeopleId(cPeopleId);
    }

    /**
     * 查询重点人和事件关联
     * 列表
     *
     * @param tPeopleLinkEvent 重点人和事件关联
     * @return 重点人和事件关联
     */
    @Override
    public List<TPeopleLinkEvent> selectTPeopleLinkEventList(TPeopleLinkEvent tPeopleLinkEvent) {
        return tPeopleLinkEventMapper.selectTPeopleLinkEventList(tPeopleLinkEvent);
    }

    /**
     * 新增重点人和事件关联
     *
     * @param tPeopleLinkEvent 重点人和事件关联
     * @return 结果
     */
    @Override
    public int insertTPeopleLinkEvent(TPeopleLinkEvent tPeopleLinkEvent) {
        return tPeopleLinkEventMapper.insertTPeopleLinkEvent(tPeopleLinkEvent);
    }

    /**
     * 修改重点人和事件关联
     *
     * @param tPeopleLinkEvent 重点人和事件关联
     * @return 结果
     */
    @Override
    public int updateTPeopleLinkEvent(TPeopleLinkEvent tPeopleLinkEvent) {
        return tPeopleLinkEventMapper.updateTPeopleLinkEvent(tPeopleLinkEvent);
    }

    /**
     * 批量删除重点人和事件关联
     *
     * @param cPeopleIds 需要删除的重点人和事件关联
     *                   主键
     * @return 结果
     */
    @Override
    public int deleteTPeopleLinkEventByCPeopleIds(Long[] cPeopleIds) {
        return tPeopleLinkEventMapper.deleteTPeopleLinkEventByCPeopleIds(cPeopleIds);
    }

    /**
     * 删除重点人和事件关联
     * 信息
     *
     * @param cPeopleId 重点人和事件关联
     *                  主键
     * @return 结果
     */
    @Override
    public int deleteTPeopleLinkEventByCPeopleId(Long cPeopleId) {
        return tPeopleLinkEventMapper.deleteTPeopleLinkEventByCPeopleId(cPeopleId);
    }
}
